# -*- coding: utf-8 -*-
# https://blog.csdn.net/weixin_52040868
# 公众号：测个der
# 微信：qing_an_an

import sys
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *


class QWIN(QWidget):
    def __init__(self):
        super(QWIN, self).__init__()
        self.initUI()

    def initUI(self):
        lcd = QLCDNumber(self)
        slider = QSlider(Qt.Horizontal,self)

        Box = QVBoxLayout()
        Box.addWidget(lcd)
        Box.addWidget(slider)

        self.setLayout(Box)
        slider.valueChanged.connect(lcd.display)

        self.setGeometry(300,300,350,150)

if __name__ == '__main__':
    app = QApplication(sys.argv)
    win = QWIN()
    win.show()
    sys.exit(app.exec_())
